# !/usr/bin/env python
# -*- coding: utf-8 -*-

# @File   : check.py
# @Time   : 2022/5/30 4:43 下午
# @Author : yujianhui
import re

def equal(expect, actual):
    """
    判断是否相等
    :param actual:
    :param expect:
    :return: True or False
    """
    assert actual == expect


def contain(expect, actual):
    """
    判断是否包含
    actual转换成string进行断言
    :param actual:
    :param expect:
    :return: True or False
    """
    assert expect in str(actual)

def regex(pattern, string):
    """
     正则表达式，是否包含
    :param pattern: 正则表达式
    :param string:
    :return: True or False
    """
    if re.search(pattern, string) is not None:
        assert True
    else:
        assert False